package com.algo.rpc.business;

import java.io.Serializable;
import java.util.List;

public class UserInfo implements Serializable {

    private String userName;
    private int age;

    private List<SubInfo> subInfoList;

    public UserInfo(String userName, int age, List<SubInfo> subInfoList) {
        this.userName = userName;
        this.age = age;
        this.subInfoList = subInfoList;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public List<SubInfo> getSubInfoList() {
        return subInfoList;
    }

    public void setSubInfoList(List<SubInfo> subInfoList) {
        this.subInfoList = subInfoList;
    }

    @Override
    public String toString() {
        return "UserInfo{" +
                "userName='" + userName + '\'' +
                ", age=" + age +
                ", subInfoList=" + subInfoList +
                '}';
    }

    static class SubInfo implements Serializable {
        private String subField;

        public SubInfo(String subField) {
            this.subField = subField;
        }

        public void setSubField(String subField) {
            this.subField = subField;
        }

        public String getSubField() {
            return subField;
        }

        @Override
        public String toString() {
            return "SubInfo{" +
                    "subField='" + subField + '\'' +
                    '}';
        }
    }

}
